<template>
	<el-card class="box-card">
		<view slot="header" class="header">
			<text class="header-title">商品浏览量排行榜</text>
		</view>
		<view class="box-card-body" style="height: 500px;">
			<qiun-data-charts type="bar" :opts="data.opts" :localdata="data.list" />
		</view>
	</el-card>
</template>

<script>
export default {
	name: "getGoodsViewCount",
	props: {

	},
	data() {
		return {
			data:{
				list:[],
				opts: {
					color: ["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],
					padding: [15,80,0,5],
					legend: {},
					xAxis: {
						boundaryGap: "justify",
						disableGrid: false,
						min: 0,
						axisLine: false,
						max: 50
					},
					yAxis: {},
					extra: {
						bar: {
							type: "stack",
							width: 30,
							meterBorde: 1,
							meterFillColor: "#FFFFFF",
							activeBgColor: "#000000",
							activeBgOpacity: 0.08,
							categoryGap: 2
						}
					}
				}
			},
			loading:false,
		};
	},
	mounted() {
		this.init();
	},
	methods: {
		init() {
			this.getList();
		},
		getList(){
			let that = this;
			vk.callFunction({
				url: 'admin/business/kh/stats.getGoodsViewCount',
				data: {

				},
				success: (data) => {
					that.data.list = data.list;
				}
			});
		}
	},
	watch: {

	},
	computed: {

	}
};
</script>
<style lang="scss" scoped>
@import "@/pages/stats/common/css/index.scss";
</style>
